import { TodayHealthyTest, TestDetail } from "../types/health-test";

export const healthyTestStore = { 
    state: {
        todayTests: [],
        testSeq: 0,
        testDetail: null,
    }, 
    mutations: {
        setTodayTests(state, payload: TodayHealthyTest) { 
            state.todayTests = payload;
        },
        setTestSeq(state, seq: number) {
            state.testSeq = seq;
        },
        setTestDetail(state, payload: TestDetail) {
            state.testDetail = payload;
        },
        clearHealthyTestStore(state) { 
            state.todayTests = [];
            state.testSeq = 0;
            state.testDetails = null;
        }
    },
}